package com.dba.example.guice.beans;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class PageRequest {
	
	private Integer offset;

	private Integer size;
	
	private List<OrderBy> sort;
	
	public PageRequest() {
		
	}
	
	public PageRequest(Integer offset, Integer size, List<OrderBy> sort) {
		this.offset = offset;
		this.size = size;
		this.sort = new ArrayList<OrderBy>(sort);
	}
	
	public PageRequest(Integer offset, Integer size, OrderBy... orderBy) {
		this(offset, size, Arrays.asList(orderBy));
	}

	public Integer getOffset() {
		return offset;
	}

	public Integer getSize() {
		return size;
	}

	public List<OrderBy> getSort() {
		return sort;
	}

}
